package com.example.demo.controller;

import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 666
 * Date: 2023-07-29
 * Time: 5:11
 */
@RestController
@RequestMapping("/logger")
@Slf4j
public class UserLogger {
    private  static Logger logger = LoggerFactory.getLogger(UserLogger.class);

    @RequestMapping("/log")
    public String loggerTest() {
        log.error("打印日志内容");
        return "我爱你";
    }
    @RequestMapping("/user")
    public static String getLogger() {
        logger.info("输出日志");
        return "输出日志";
    }
}
